import axios from '../http'

const api = '/api/ad/advert';

const error = (m) => (d) => console.error(m,d);

export function listAds(cb, fcb = error('listAds')) {
    axios.get(api).then(d => cb(d.data)).catch(d => fcb(d))
}